import { SET_BUSINESS_INFO, RESET } from 'Constants/businessConstants';

const initialState = {
  id: 0,
  name: '',
  type: '',
};

export default function businessReducer(state = initialState, action) {
  switch (action.type) {
    case SET_BUSINESS_INFO:
      return Object.assign({}, state, {
        ...action.payload,
      });
    case RESET:
    default:
      return state;
  }
}
